package org.example.demo2.service.impl;

import org.example.demo2.mapper.FileMapper;
import org.example.demo2.pojo.FileInfo;
import org.example.demo2.service.IFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FileServiceImpl implements IFileService {

    @Autowired
    FileMapper fileMapper;

    @Override
    public void upload(FileInfo fileInfo) {
        int i = fileMapper.insertFile(fileInfo);
        if(i<=0){
            System.out.println("请求失败");
        }

    }

    @Override
    public FileInfo getFile(String fileId) {
        FileInfo fileInfo=new FileInfo();
        fileInfo.setFileId(fileId);
        fileInfo.setFileName("logo.jpg");
        fileInfo.setFilePath("D:\\test\\9184e885-c4a1-40f6-89e8-137b15ad0e38.jpg");
        return fileInfo;
    }
}
